<?php
class Teacher{

	public $tableName='teacher';//表名
	private  $dao;
	public function __construct(){
		$this->dao=new Mysql();
	}

	public function findByPk($id){
			//var_dump($this->dao);
		return $this->dao->findByPk($this->tableName,$id);
	}
	
	public function delete($id){
		$sql=sprintf("delete from teacher where id='%s'",$id);
		return $this->dao->query($sql);
	}
	/***
		教师密码的修改
	*/
	public function changePassword($newPassowrd,$teacher_id){
		$sql=sprintf("update teacher  set password ='%s'where id='%s'",$teacher_id);
		return $this->dao->query($sql);
	}




}


?>
